import { LAYOUT } from '@/router/constants';
import type { RouteRecordItem } from 'vc/src/router';
const IFrame = () => import('@/views/sys/iframe/frame-blank.vue');
export const LINK_ENTERPRISE = '/other';
export const LINK_ZLIBHTML_OVERVIEW = LINK_ENTERPRISE + '/zlibHtml';
export const LINK_PDFVIEW_OVERVIEW = LINK_ENTERPRISE + '/pdfView';
export const LINK_IMAGE_OVERVIEW = LINK_ENTERPRISE + '/imgView';
export const LINK_LAWS_OVERVIEW = LINK_ENTERPRISE + '/lawsRulesDetail';
export const LINK_WPS_OVERVIEW = LINK_ENTERPRISE + '/wpsView';

const Other: RouteRecordItem = {
  path: LINK_ENTERPRISE,
  component: LAYOUT,
  meta: {
    title: '',
    hideSide: true
  },
  children: [
    {
      path: LINK_ZLIBHTML_OVERVIEW + '/:url?' + '/:id?' + '/:bizType?',
      meta: {
        title: '查看详情',
        hideSide: true
      },
      component: () => import('@/views/modules/other/zlibHtml/index.vue')
    },
    {
      path: LINK_IMAGE_OVERVIEW + '/:url?' + '/:position?',
      meta: {
        title: '查看详情',
        hideSide: true
      },
      component: () => import('@/views/modules/other/imgView/index.vue')
    },
    {
      path: LINK_PDFVIEW_OVERVIEW + '/:url',
      meta: {
        title: '查看详情',
        hideSide: true,
        isIframe: true
      },
      component: IFrame
    },
    {
      path: LINK_LAWS_OVERVIEW + '/:data?',
      meta: {
        title: '法规详情',
        hideSide: true
      },
      component: () => import('@/views/modules/other/lawsRulesDetail/index.vue')
    },
    {
      path: LINK_WPS_OVERVIEW + '/:url',
      meta: {
        title: '查看详情',
        hideSide: true
      },
      component: () => import('@/views/modules/other/wpsView/index.vue')
    }
  ]
};

export default Other;
